package com.logicalthinking.socialmall.entity;

import com.github.chenlijia1111.utils.core.annos.PropertyCheck;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.persistence.*;

/**
 * 产品附加属性
 * @author chenLiJia
 * @since 2020-02-17 14:43:32
 * @version 1.0
 **/
@ApiModel("产品附加属性")
@Table(name = "m_product_append")
@Setter
@Getter
@Accessors(chain = true)
public class ProductAppend {
    /**
     * 产品id
     */
    @ApiModelProperty("产品id")
    @PropertyCheck(name = "产品id")
    @Id
    @Column(name = "product_id")
    private String productId;

    /**
     * 发布位置
     */
    @ApiModelProperty("发布位置")
    @PropertyCheck(name = "发布位置")
    @Column(name = "release_address")
    private String releaseAddress;

    /**
     * 发布位置经度
     */
    @ApiModelProperty("发布位置经度")
    @PropertyCheck(name = "发布位置经度")
    @Column(name = "release_address_longitude")
    private Double releaseAddressLongitude;

    /**
     * 发布位置纬度
     */
    @ApiModelProperty("发布位置纬度")
    @PropertyCheck(name = "发布位置纬度")
    @Column(name = "release_address_latitude")
    private Double releaseAddressLatitude;

    /**
     * 交易方式是否支持线上交易 0否1是
     */
    @ApiModelProperty("交易方式是否支持线上交易 0否1是")
    @PropertyCheck(name = "交易方式是否支持线上交易 0否1是")
    @Column(name = "transaction_type_support_online")
    private Integer transactionTypeSupportOnline;

    /**
     * 交易方式是否支持当面交易 0否1是
     */
    @ApiModelProperty("交易方式是否支持当面交易 0否1是")
    @PropertyCheck(name = "交易方式是否支持当面交易 0否1是")
    @Column(name = "transaction_type_support_inperson")
    private Integer transactionTypeSupportInperson;

    /**
     * 最小价格
     */
    @ApiModelProperty("最小价格")
    @PropertyCheck(name = "最小价格")
    @Column(name = "min_price")
    private Double minPrice;

    /**
     * 最大价格
     */
    @ApiModelProperty("最大价格")
    @PropertyCheck(name = "最大价格")
    @Column(name = "max_price")
    private Double maxPrice;

    /**
     * 销量
     */
    @ApiModelProperty("销量")
    @PropertyCheck(name = "销量")
    @Column(name = "sales_count")
    private Integer salesCount;

    /**
     * 运费
     */
    @ApiModelProperty(value = "运费")
    @PropertyCheck(name = "运费")
    @Column(name = "freight")
    private Double freight;

    /**
     * 运费券,关联券 coupon 用于订单计算
     */
    @ApiModelProperty(value = "运费券")
    @PropertyCheck(name = "运费券")
    @Column(name = "freight_coupon")
    private String freightCoupon;

}